<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    class Person{
        name;
        #age;
        #weight;


        constructor(name, age, weight) {
            this.name = name;
            this.#age = age;
            this.#weight = weight;
        }

        showPerson() {
            console.log(this.name, this.#age, this.#weight);
        }
    }

    let person = new Person("a", "s", "d");
    console.log(person.name);

    //Private field '#age' must be declared in an enclosing class
    // console.log(person.#age);

    person.showPerson()
</script>
</body>
</html>
